package com.zyx.xunyilu.controller;

import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @ClassName: ViewController
 * @author: zyx
 * @E-mail: 1377631190@qq.com
 * @DATE: 2020/4/15 2:59
 */
@Controller
public class ViewController {

    @GetMapping("/login/admin")
    public String login() {
        return "admin/login";
    }

    @RequiresRoles("admin")
    @GetMapping("/admin/index")
    public String index() {
        return "admin/index";
    }

    @RequiresRoles("admin")
    @GetMapping("/admin/users")
    public String users() {
        return "admin/users";
    }

    @RequiresRoles("admin")
    @GetMapping("/admin/table")
    public String table() {
        return "admin/table";
    }

    @RequiresRoles("admin")
    @GetMapping("/admin/article")
    public String article() {
        return "admin/article";
    }

}
